<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<div id="accordion_container" dojoType="dijit.layout.AccordionContainer" style="width:100%; height:90%;">
	<div id="accordion_search_pane"  dojoType="dijit.layout.AccordionPane" title="<img src='images/search.png' width='12' height='12'/> Search">
	</div>
	<sec:authorize ifAnyGranted="ROLE_ADMIN">		
	<div id="accordion_tools_pane" dojoType="dijit.layout.AccordionPane" title="<img src='images/tools.png' width='12' height='12'/> Tools">
		<div id="leftMenubarTools" dojoType="dijit.Menu" layoutAlign="left" >
			<span dojoType="dijit.MenuItem" onClick="location.href='containerAuction.htm'"><img src="images/auction.png"/>&nbsp;Auction</span>			
			<span dojoType="dijit.MenuItem" onClick="location.href='containerBrand.htm'"><img src="images/brand.png"/>&nbsp;Brand</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerCategory.htm'"><img src="images/category.png"/>&nbsp;Category</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerCompany.htm'"><img src="images/company.png"/>&nbsp;Company</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerInventory.htm'"><img src="images/inventory.png"/>&nbsp;Inventory</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerItem.htm'"><img src="images/item.png"/>&nbsp;Item</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerRole.htm'"><img src="images/role.png"/>&nbsp;Role</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerUser.htm'"><img src="images/user.png"/>&nbsp;User</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerOrder.htm'"><img src="images/order.png"/>&nbsp;Order</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerTransaction.htm'"><img src="images/transaction.png"/>&nbsp;Transaction</span>
			<span dojoType="dijit.MenuItem" onClick="location.href='containerBid.htm'"><img src="images/bid.png"/>&nbsp;Bid</span>
		</div>
	</div>
	</sec:authorize>
	<sec:authorize ifAnyGranted="ROLE_ADMIN, ROLE_USER">
	<div id="accordion_personal_pane"  dojoType="dijit.layout.AccordionPane" title="<img src='images/personal.png' width='12' height='12'/> Personal">
		<div id="leftMenubarPersonal" dojoType="dijit.Menu" layoutAlign="left" >
			<span dojoType="dijit.MenuItem" onClick="location.href='myBids.htm'"><img src="images/mybid.png"/>&nbsp;My Bids</span>			
			<span dojoType="dijit.MenuItem" onClick="location.href='containerBrand.htm'"><img src="images/myaccount.png"/>&nbsp;My Account</span>
		</div>
	</div>
	</sec:authorize>
</div>
<script>
// Select the Tools accordion Pane
function renderToolsAndPersonal(){
	dojo.addOnLoad(function(){
		var accordion = dijit.byId("accordion_container");
		var accordionToolsPane = dijit.byId("accordion_tools_pane");
		if (accordion != 'undefined') {
			accordion.selectChild(accordionToolsPane);
			accordion.setLabel("<div><img src='images/auction.png'/>");
		}
	});
	
}
dojo.addOnLoad(renderToolsAndPersonal);
</script>